<!doctype html> 
<html ng-app='text'> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <script type="text/javascript" src='angular.js'></script>
    <script type="text/javascript">


    var app = angular.module('text',[]);
/*
    app.factory('leo',function (){
    	return {
    		x : 20
    	}
    });
*/
/*
	app.provider('leo',function (){
		this.$get = function(){
			return {
				m:30
			}
		}
	})
*/
/*
	app.service('leo',function (){
		this.m = 'leo';
	})
*/
/*
	app.value('leo',{
		l:'haha'
	});
*/
	app.constant('leo',10)
    app.decorator('leo',function ($delegate){
    	//$delegate.x = 30;
    	$delegate = 30;
    	return $delegate;
    })

    app.controller('const',function (leo){
    	console.log(leo);
    });

    </script>
</head>
<body ng-controller='const'>
</body>
</html>